package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.OrderItemsMapper;
import com.ruoyi.order.domain.OrderItems;
import com.ruoyi.order.service.IOrderItemsService;

/**
 * 订单细节Service业务层处理
 *
 * @author jtm
 * @date 2024-12-07
 */
@Service
public class OrderItemsServiceImpl implements IOrderItemsService
{
    @Autowired
    private OrderItemsMapper orderItemsMapper;

    /**
     * 查询订单细节
     *
     * @param id 订单细节主键
     * @return 订单细节
     */
    @Override
    public OrderItems selectOrderItemsById(Long id)
    {
        return orderItemsMapper.selectOrderItemsById(id);
    }

    /**
     * 查询订单细节列表
     *
     * @param orderItems 订单细节
     * @return 订单细节
     */
    @Override
    public List<OrderItems> selectOrderItemsList(OrderItems orderItems)
    {
        return orderItemsMapper.selectOrderItemsList(orderItems);
    }

    /**
     * 新增订单细节
     *
     * @param orderItems 订单细节
     * @return 结果
     */
    @Override
    public int insertOrderItems(OrderItems orderItems)
    {
        return orderItemsMapper.insertOrderItems(orderItems);
    }

    /**
     * 修改订单细节
     *
     * @param orderItems 订单细节
     * @return 结果
     */
    @Override
    public int updateOrderItems(OrderItems orderItems)
    {
        return orderItemsMapper.updateOrderItems(orderItems);
    }

    /**
     * 批量删除订单细节
     *
     * @param ids 需要删除的订单细节主键
     * @return 结果
     */
    @Override
    public int deleteOrderItemsByIds(Long[] ids)
    {
        return orderItemsMapper.deleteOrderItemsByIds(ids);
    }

    /**
     * 删除订单细节信息
     *
     * @param id 订单细节主键
     * @return 结果
     */
    @Override
    public int deleteOrderItemsById(Long id)
    {
        return orderItemsMapper.deleteOrderItemsById(id);
    }
}
